BeginPackage["MultiAgent`"]

Begin["`Private`"]

PARAMS = {};
PJ[p_] := 
	AppendTo[PARAMS, p];

getParam[p_] :=
	Module[{},
		Select[PARAMS, Equal[First@#, p]& ][[1, 2]]
	];

(* ----------------------------- CONFIG DATA ----------------------------- *)(* can be loaded from Settings table of DB *)

(* Type of currency system *)
MoneySystem = "Mono";

(* number of days to simulate *)
Days -> 100 // PJ;

(* number of sessions in a day for each market *) 
Sessions -> 3 // PJ;

(* number of products, total, have to be more than NumRes *)
Products -> 5 // PJ;

(* number of Agents *)
Agents -> 100 // PJ;

(* start amount of main product (index = 1, Money) *)
StartMoney -> 40 // PJ;

(* duration of a period for one strategy - in days *)
StratPeriod -> 10 // PJ;

(* index of production function, 0 = strProdRandom *)
ProdFuncInd -> 1 // PJ;

(* the price, which all markets start trading from: {a,b} <=> Random from a to b *)
FirstPrice -> 1.1 // PJ;

(* max discount part, which agents can apply to predicted price while selling *)
MaxDiscount = 0.00;

(* step to increase or decrease pobability of strategy while learning *)
WeightStep = 0.1;


(* ------------------ CONSTANTS 4 AGENTS PARAMS ---------------- *)(* generated values can be loaded from Agents table of DB *)

(* range of values (min, max) for lambda coefs genetations *)
CLambdaRange = {0.7, 0.9};

(* range of values (min, max) for cons Norm generations *)
CNormRange = {0.1, 0.2};

(* dist to generate daily regeneration of resources; trancate with {? , 0} leads to no produce *)
CRegen = TruncatedDistribution[ {-1, 0}, NormalDistribution[0.0, 5.0] ];

(* dist to generate goods quantity at start *)
CQuantGoods = TruncatedDistribution[ {0, 20}, NormalDistribution[10, 4] ];

(* dist to generate coefs for linear production function *)
CLinearProduce = TruncatedDistribution[ {0.5, 3}, NormalDistribution[2, 0.5] ];

(* dist to generate coefs for Min production function *)
CMinProduce = TruncatedDistribution[ {0.1, 6}, NormalDistribution[4, 2] ];

(* dist to generate coefs for Cobb Douglas production function *)
CCDTech = TruncatedDistribution[ {0, 5}, NormalDistribution[1.0, 0.5] ];

CCDProduce = TruncatedDistribution[ {0, 2}, NormalDistribution[0.8, 1.0] ];

(* -------------- OTHER CONSTANTS ----------------- *)(* not loaded from DB !! *)

(* list of available products *)
ResourceList = {"Money", "Labor", "Water", "Energy", "Ferrum", "Gold", "Oil", "Wheat", "Coil", "Silver", "Platinum", "Bitcoin", "Teabags"};

(* types of production function *)
ProdFunctions = {"Linear", "Min", "CD", "CES"};

(* percent to estimate relation richest to poorest *)
RelationPercent = 10;

CEpsAmount = 0.001;
CEpsPrice = 0.0001;
DebugTrade = False;

End[]

EndPackage[]
